1. Field of the Invention
The present invention relates to an external storage apparatus incorporating a storage means arranged to erase data in units of predetermined blocks and a data processing method for processing data which is stored in an external storage apparatus of the foregoing type.
2. Related Background Art
As external storage apparatuses of a type for use in a data processing apparatus, such as a personal computer or a digital still camera, external storage apparatuses of a type incorporating a so-called flash memory are known.
The external storage apparatus incorporating the flash memory has a structure that a storage region of the flash memory is divided into a plurality of blocks so as to manage a data region in block units. That is, erasing of data is performed in block units. If an unrecoverable error is made in the storage region, use of the block including the region in which the error has been made is inhibited. A block of the foregoing type is hereinafter called a use-inhibited block.
The external storage apparatus of the foregoing type has a structure that boot data containing information and so forth required to make an access to the external storage apparatus are previously stored in a predetermined block. When the external storage apparatus is booted up, boot data is initially read. Then, an access is made to the external storage apparatus in accordance with obtained boot data so that data is written/read.
In the external storage apparatus of the foregoing type, boot data usually contains information required to make an access to the external storage apparatus. If boot data cannot be read, the access to the external storage apparatus cannot be made. Therefore, boot data must have satisfactory reliability.
Hitherto, the block (hereinafter called a “boot block”) in which boot data is stored is a block formed at a predetermined position. Even if a boot block which is usually used is made to be the use-inhibited block, a copy of boot data is stored in another block so that boot data is read. In the conventional external storage apparatus, the reliability is furthermore improved by preparing a plurality of copies of boot data. Moreover, the copies are stored in different blocks. However, the method in which the multiplicity of the copies of boot data are prepared is an undesirable method in a viewpoint of effectively using the storage capacity.
Hitherto, when boot data has been updated, whether or not all of the copies of boot data have been updated to latest boot data has not been determined. Therefore, if the copy of boot data is not correctly updated to latest boot data in a certain operation, latest, that is, correct boot data cannot be read. In the foregoing case, there is apprehension that a correct access to the external storage apparatus cannot be made.
Hitherto, even if a copy of boot data is prepared, the copy is used only when reading of boot data of the original fails. Therefore, if the contents of original boot data are made to be incorrect because, for example, bits in a portion of the boot block in which original boot data has been stored are undesirably inverted, there arises a problem in that the foregoing boot data is as it is used if foregoing boot data can be read.